package com.smm.web.vmc.controller.User;

/**
 * Created by Administrator on 2017/6/28.
 *
 */
import com.smm.web.vmc.domain.Warehouse;
import com.smm.web.vmc.service.WarehouseService;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping({"/wh"})
public class WHController {
    @Resource
    private WarehouseService warehouseService;

    public WHController() {
    }

    @RequestMapping({"/info.do"})
    public ModelAndView info(int id) {
        ModelAndView mv = new ModelAndView("wh/info");
        Warehouse warehouse = this.warehouseService.getOneById(id);
        mv.addObject("wh", warehouse);
        return mv;
    }
}